import { pa } from "element-plus/es/locales.mjs";
import request from "../utlis/request";
//商品获取接口
export function getGoodsAPI(pagenum, pageSize) {
  return request.post("/product/productList", {
    pagenum,
    pageSize
  });
}
//修改商品接口
export function updateProductAPI(data) {
  return request.put("/product/updateProduct", data);
}
//添加商品接口
export function addProductAPI(data) {
  return request.post("/product/addProduct", data);
}
//上传图片接口
export function uploadImgAPI(data) {
  return request.post("/product/uploadProductLogo", data, {
    headers: { "Content-Type": "multipart/form-data" },
  });
}

//删除商品接口
export function deleteProductAPI(id) {
  return request.delete(`/product/deleteProduct/${id}`);
  // params: { id }两种参数都可以
}
